Skip to content

docs: teach site and collector key types for Capture and OTLP HTTP - #904

Closed
davidmytton wants to merge 2 commits into
mainfrom
david/cursor/collector-keys-capture-otlp-01a9
Closed

docs: teach site and collector key types for Capture and OTLP HTTP#904
davidmytton wants to merge 2 commits into
mainfrom
david/cursor/collector-keys-capture-otlp-01a9

Conversation

@davidmytton

@davidmytton davidmytton commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Documents the credential outcome from arcjet#8942 (0b49efff694ba343696573620a2c444283ef2f45).

What changed

Arcjet issues two secrets: a site SDK key (ajkey_) and a project collector key (aj_prj_key_). Capture and OTLP HTTP accept either. Site keys keep working.

Collector keys are ingest-only. In production, Guard and Decide respond 404 to a collector key. ARCJET_KEY for protect() and guard() stays a site key.

OTLP is HTTP only. Set OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer <site or collector key>" against the Worker HTTP endpoint. gRPC OTLP is unsupported.

Where

  • Environment variables: replace the “always prefixed with ajkey_” claim with the two key kinds, the Capture/OTLP acceptance matrix, and the OTLP HTTP header.
  • Troubleshooting: the same prefix claim, plus a short collector-key-on-Guard/Decide note.
  • Capture events: the page assumed an existing client and omitted key types. It now says Capture accepts either key and that a collector key cannot call guard() or protect().

No new OTLP product page. No Project View / customer Project UI. Collector keys are documented as issued through the project and site APIs. No actor, inputs, policyInput, or remote-policy teaching. Separate from #901 (Python capture degraded).

Verification

  • astro check: 0 errors, 0 warnings.
  • Production build with ARCJET_KEY set: complete; starlight-links-validator reports all internal links valid.
  • Previewed /environment, /guards/capture, and /troubleshooting: new key-type copy is present; the old “always prefixed with ajkey_” sentence is gone.
  • Playwright: npm run pw:run -- --update-snapshots=changed -g troubleshooting passed (2 tests).

Environment variables key types
Capture events Keys section
Troubleshooting invalid key copy
Troubleshooting collector key 404 note
Troubleshooting collector key site-key guidance

Open in Web Open in Cursor 

Capture and OTLP HTTP accept a site SDK key or a project collector key.
Collector keys are ingest-only; protect and guard still require a site key.

Co-authored-by: David Mytton <davidmytton@users.noreply.github.com>
@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
arcjet-docs Ready Ready Preview Aug 25, 2026 9:32pm

Request Review

Co-authored-by: David Mytton <davidmytton@users.noreply.github.com>
@davidmytton
davidmytton marked this pull request as ready for review August 25, 2026 21:26

@arcjet-review arcjet-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arcjet Review — 🟢 Low Risk

Decision: Approved

Rationale: Documentation-only change updating three MDX files to describe two key kinds (site SDK key ajkey_ and project collector key aj_prj_key_) plus regenerated screenshot snapshots. No code, no dependencies, no infrastructure. No security-sensitive code paths touched; the change is descriptive prose explaining how existing endpoints treat the two key types.

Summary of Changes

Docs update explaining that Arcjet issues two key types — site SDK keys (ajkey_) and project collector keys (aj_prj_key_) — and clarifying which is accepted by protect()/guard() (site only), Capture, and OTLP HTTP (either). Updates environment.mdx, guards/capture.mdx, and troubleshooting.mdx, plus regenerated troubleshooting screenshot baselines.

Review: a7b1e341 | Model: anthropic/claude-opus-4-7 | Powered by Arcjet Review


OTLP export to Arcjet is HTTP only. Set this header on the exporter:

```sh

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The header value "Authorization=Bearer SITE_OR_COLLECTOR_KEY" uses = between header name and value, which is the format OTEL_EXPORTER_OTLP_HEADERS expects (comma-separated key=value pairs). Confirm this is intentional — readers familiar with raw HTTP headers may expect Authorization: Bearer ... and copy-paste this incorrectly. Consider a one-line note that the = is required by the OTEL env-var syntax, not a typo.

@davidmytton

Copy link
Copy Markdown
Collaborator Author

We'll leave this undocumented for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants